PRO MAKE_FAKE_SOURCES
  
  COMPILE_OPT IDL2, LOGICAL_PREDICATE
  
  COMMON OMNI_CONFIG, conf, mw, local, dpdfs, ancil, fmt, conffile
  
  ;; Read in survey-info config file
  conf = omni_load_conf(cfile)
  mw   = omni_read_conffile('./conffiles/galactic_params.conf')
  
  ;; Constants
  c     =  299792458.d          ; Speed of Light     [m/s]
  kb    = 1.3806503d-23         ; Boltzmann constant [m^2 kg s^-2 K^-1]
  h     = 6.626068d-34          ; Planck constant    [m^2 kg s^-1]
  Jy    = 1.d-26                ; Jansky             [W m^-2 Hz^-1]
  kpc   = 3.08567758d19         ; kiloparsec         [m]
  kappa = conf.kappa/10.d       ; dust opactiy       [m^2/kg]
  msun  = 1.9891d30             ; Solar Mass         [kg]
  pc    = 3.08567758d16         ; parsec             [m]
  
  hnuk = h*conf.nu/kb
  
  m0 = c*c*Jy*kpc*kpc/2.d/h/conf.nu/conf.nu/conf.nu/kappa*$
       (exp(hnuk/mw.td)-1.d)/msun*mw.gas2dust
  
  
  
  m = 1000.                     ; M_sun
  
  ;; Assume constant-density spheres
  R = 1.                        ; pc
  D = 4.                        ; kpc
  
  print,2.d*h*conf.nu*conf.nu*conf.nu/c/c/(exp(hnuk/mw.td)-1.d)/Jy
  print,planck_mm(c/conf.nu*1.d3,mw.td)
  
  snu_int = 3.d * !dpi * kappa * planck_mm(c/conf.nu*1.d3,mw.td) * $
            m * msun / 8.d / (D*D*kpc*kpc) / mw.gas2dust
  
  ;; snu_int = snu_int * 8.d / (3.d * !dpi) ; factor of 1.18 for geometry
  
  print,c/conf.nu*1.d3,mw.td
  print,'1e3 object at 4 kpc is ',snu_int
  
  
END
